/**
 * jims
 */
package com.jims.master.modules.blood.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jims.master.common.persistence.DataEntity;
import com.jims.master.modules.doctor.entity.PatMasterIndex;
import com.jims.master.modules.sys.entity.Dict;
import com.jims.master.modules.sys.entity.User;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;

/**
 * 配血功能Entity
 * @author fengyg
 * @version 2017-04-12
 */
public class BloodMatch extends DataEntity<BloodMatch> {
	
	private static final long serialVersionUID = 1L;
	private String matchSheetNum;		// 配血单号
	private String applyId;		// 申请单号
	private String bloodId;		// 储血号(血袋标识)
	private String matchMetch;		// 配血方法
	private String matchResult;		// 配血结果
	private Date matchDate;		// 配血日期
	private Date invalDate;		// 失效日期(此份配血记录失效)
	private Date stopDate;		// 停止日期
	private String bloodMatch;		// 配血划价
	private String componentId;		// 血液成分
	private String matchResultSecond;		// 第二配血结果
	private String bloodUser1;		// 第一配血人
	private String bloodUser2;		// 第二配血人
    private String sendFlag;           //发血状态(0,未发血;1,已发血)
    private String matchPriceIds;      //配血费用ID集合

    private String patBloodGroupName;    //血型名称
    private String patientName;    //患者姓名
    private String sex;
    private String age;
    private String visitNo;         //患者住院号
    private String appDoctorName;      //开单医生姓名
    private String componentName;   //血液成分名称
    private BloodApply bloodApply;       //用血申请主记录
    private BloodCapacity bloodCapacity; //用血申请明细记录
    private PatMasterIndex patMasterIndex; //患者信息
    private Date startDate;
    private List<BloodMatch> matchList;
    private List<Dict> matchMetchDictList;  //配血方法list
    private List<Dict> matchResultDictList;    //配血结果list
    private List<User> matchUserList;    //配血人list
    private BloodInpDetail bloodInpDetail;

	public BloodMatch() {
		super();
	}

	public BloodMatch(String id){
		super(id);
	}

	@Length(min=1, max=20, message="配血单号长度必须介于 1 和 20 之间")
	public String getMatchSheetNum() {
		return matchSheetNum;
	}

	public void setMatchSheetNum(String matchSheetNum) {
		this.matchSheetNum = matchSheetNum;
	}
	
	@Length(min=1, max=64, message="申请单号长度必须介于 1 和 64 之间")
	public String getApplyId() {
		return applyId;
	}

	public void setApplyId(String applyId) {
		this.applyId = applyId;
	}
	
	@Length(min=1, max=20, message="储血号(血袋标识)长度必须介于 1 和 20 之间")
	public String getBloodId() {
		return bloodId;
	}

	public void setBloodId(String bloodId) {
		this.bloodId = bloodId;
	}
	
	@Length(min=0, max=2, message="交叉配血方法(描述交叉配血所用药物)长度必须介于 0 和 2 之间")
	public String getMatchMetch() {
		return matchMetch;
	}

	public void setMatchMetch(String matchMetch) {
		this.matchMetch = matchMetch;
	}
	
	@Length(min=0, max=2, message="交叉配血结果(相合，不相合)长度必须介于 0 和 2 之间")
	public String getMatchResult() {
		return matchResult;
	}

	public void setMatchResult(String matchResult) {
		this.matchResult = matchResult;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="配血日期不能为空")
	public Date getMatchDate() {
		return matchDate;
	}

	public void setMatchDate(Date matchDate) {
		this.matchDate = matchDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getInvalDate() {
		return invalDate;
	}

	public void setInvalDate(Date invalDate) {
		this.invalDate = invalDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getStopDate() {
		return stopDate;
	}

	public void setStopDate(Date stopDate) {
		this.stopDate = stopDate;
	}
	
	@Length(min=0, max=1, message="配血划价长度必须介于 0 和 1 之间")
	public String getBloodMatch() {
		return bloodMatch;
	}

	public void setBloodMatch(String bloodMatch) {
		this.bloodMatch = bloodMatch;
	}
	
	@Length(min=1, max=64, message="血液成分长度必须介于 1 和 64 之间")
	public String getComponentId() {
		return componentId;
	}

	public void setComponentId(String componentId) {
		this.componentId = componentId;
	}
	
	@Length(min=0, max=1, message="第二配血结果(相合，不相合)长度必须介于 0 和 1 之间")
	public String getMatchResultSecond() {
		return matchResultSecond;
	}

	public void setMatchResultSecond(String matchResultSecond) {
		this.matchResultSecond = matchResultSecond;
	}
	
	@Length(min=0, max=10, message="第一配血人长度必须介于 0 和 10 之间")
	public String getBloodUser1() {
		return bloodUser1;
	}

	public void setBloodUser1(String bloodUser1) {
		this.bloodUser1 = bloodUser1;
	}
	
	@Length(min=0, max=10, message="第二配血人长度必须介于 0 和 10 之间")
	public String getBloodUser2() {
		return bloodUser2;
	}

	public void setBloodUser2(String bloodUser2) {
		this.bloodUser2 = bloodUser2;
	}

    public String getSendFlag() {
        return sendFlag;
    }

    public void setSendFlag(String sendFlag) {
        this.sendFlag = sendFlag;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public BloodApply getBloodApply() {
        return bloodApply;
    }

    public void setBloodApply(BloodApply bloodApply) {
        this.bloodApply = bloodApply;
    }

    public BloodCapacity getBloodCapacity() {
        return bloodCapacity;
    }

    public void setBloodCapacity(BloodCapacity bloodCapacity) {
        this.bloodCapacity = bloodCapacity;
    }

    public PatMasterIndex getPatMasterIndex() {
        return patMasterIndex;
    }

    public void setPatMasterIndex(PatMasterIndex patMasterIndex) {
        this.patMasterIndex = patMasterIndex;
    }

    public String getVisitNo() {
        return visitNo;
    }

    public void setVisitNo(String visitNo) {
        this.visitNo = visitNo;
    }

    public String getAppDoctorName() {
        return appDoctorName;
    }

    public void setAppDoctorName(String appDoctorName) {
        this.appDoctorName = appDoctorName;
    }

    public String getComponentName() {
        return componentName;
    }

    public void setComponentName(String componentName) {
        this.componentName = componentName;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public List<BloodMatch> getMatchList() {
        return matchList;
    }

    public void setMatchList(List<BloodMatch> matchList) {
        this.matchList = matchList;
    }

    public String getPatBloodGroupName() {
        return patBloodGroupName;
    }

    public void setPatBloodGroupName(String patBloodGroupName) {
        this.patBloodGroupName = patBloodGroupName;
    }

    public List<Dict> getMatchMetchDictList() {
        return matchMetchDictList;
    }

    public void setMatchMetchDictList(List<Dict> matchMetchDictList) {
        this.matchMetchDictList = matchMetchDictList;
    }

    public List<Dict> getMatchResultDictList() {
        return matchResultDictList;
    }

    public void setMatchResultDictList(List<Dict> matchResultDictList) {
        this.matchResultDictList = matchResultDictList;
    }

    public List<User> getMatchUserList() {
        return matchUserList;
    }

    public void setMatchUserList(List<User> matchUserList) {
        this.matchUserList = matchUserList;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public BloodInpDetail getBloodInpDetail() {
        return bloodInpDetail;
    }

    public void setBloodInpDetail(BloodInpDetail bloodInpDetail) {
        this.bloodInpDetail = bloodInpDetail;
    }

    public String getMatchPriceIds() {
        return matchPriceIds;
    }

    public void setMatchPriceIds(String matchPriceIds) {
        this.matchPriceIds = matchPriceIds;
    }
}